Owing to its remarkable electronic and transport properties, graphene has great potential of replacing silicon for next-generation electronics and optoelectronics; but its zero bandgap associated with Dirac fermions prevents such applications. Among numerous attempts to create semiconducting graphene, periodic patterning using defects, passivation, doping, nanoscale perforation, etc., is particularly promising and has been realized experimentally. However, despite extensive theoretical investigations, the precise role of periodic modulations on electronic structures of graphene remains elusive. Here we employ both the tight-binding modeling and first-principles electronic structure calculations to show that the appearance of bandgap in patterned graphene has a geometric symmetry origin. Thus the analytic rule of gap-opening by patterning graphene is derived, which indicates that if a modified graphene is a semiconductor, its two corresponding carbon nanotubes, whose chiral vectors equal graphene's supercell lattice vectors, are both semimetals.